package com.wang.elm.controller;

import com.wang.elm.entity.User;
import com.wang.elm.feign.UserServer;
import io.github.resilience4j.circuitbreaker.annotation.CircuitBreaker;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CircuitBreaker(name = "backendA")
//@CrossOrigin("*")
@RestController("/login")
public class securityController {
    @Resource
    UserServer userServer;

    @RequestMapping("/loginInfo")
    public void login(User user){
        userServer.getUserByIdByPass(user);
        System.out.println(user);
    }
}
